package com.lbw.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author lbw
 * @since 2020-09-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("video_entity")
@ApiModel(value="VideoEntity对象", description="")
public class VideoEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "视频id")
    @TableId(value = "id", type = IdType.UUID)
    private String id;

    @ApiModelProperty(value = "视频标题")
    @TableField(value = "video_title")
    private String videoTitle;

    @ApiModelProperty(value = "视频路径")
    @TableField(value = "video_path")
    private String videoPath;

    @ApiModelProperty(value = "所属章节")
    @TableField(value = "chapter")
    private String chapter;

    @ApiModelProperty(value = "学生id")
    @TableField(value = "stu_id")
    private String stuId;

    @ApiModelProperty(value = "所属科目")
    @TableField(value = "subject")
    private String subject;

    @ApiModelProperty(value = "视频时长")
    @TableField(value = "video_length")
    private Double videoLength;

    @ApiModelProperty(value = "已完成时长")
    @TableField(value = "complete_length")
    private Double completeLength;

    @ApiModelProperty(value = "教师编号")
    @TableField(value = "teacher_id")
    private String teacherId;

    @ApiModelProperty(value = "用户创建时间")
    @TableField(value = "create_date",fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat( pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createDate;

    @ApiModelProperty(value = "删除状态")
    @TableField(value = "del_flag")
    @TableLogic
    private Integer delFlag;

    /**
     * 教师对象
     */
    @TableField(exist = false)
    private TeacherEntity teacher;

    /**
     * 科目对象
     */
    @TableField(exist = false)
    private SubjectEntity subjectEntity;
    /**
     * 章节对象
     */
    @TableField(exist = false)
    private ChapterEntity chapterEntity;




}
